home *** CD-ROM | disk | FTP | other *** search
- static char tomorrow_prog[] = "@(#)Morgiges Datum ermitteln";
- static char tomorrow_ver[] = "@(#)v1.00/kr ; 14.04.91";
- /* tomorrow Ermitteln des morgigen Datums.
- **
- ** Autor Klaus Rath
- **
- ** Deklaration char *tomorrow(int format);
- **
- ** Beschreibung Die Funktion gibt per today und calcdate "morgen"
- ** im gewünschten Format zurück. Die aufrufende Funktion muß
- ** deshalb sicherstellen, daß ein char-Array ausreichender
- ** Größe definiert ist, oder sich zum Aufrufzeitpunkt genügend
- ** Speicherplatz per malloc besorgen.
- ** Erlaubte Formate, ihre Ausprägung und ihre Arraylänge:
- ** 1 tt.mm.jj 9
- ** 2 mm/tt/jj 9
- ** 3 jjmmtt 7
- ** 4 tt.mm.jjjj 11
- ** 5 mm/tt/jjjj 11
- ** 6 jjjjmmtt 9
- ** 7 tt.mm. 7
- ** 8 mm/tt 6
- ** Im Fehlerfall gibt today einen (char *)NULL zurück!
- **
- ** Änderungen 1.00 ; 14.04.91
- ** - Erste Version
- */
-
- #include <stdio.h>
- #include <string.h>
- #ifdef __TURBOC__
- #define ANSI
- #define MSDOS
- #include <stdlib.h>
- #endif
- #include "datum.h"
-
- #ifdef ANSI
- char *tomorrow(int format)
- #else
- char *tomorrow(format)
- int format;
- #endif
- {
- char buf[11];
- char rueckgabe[11];
-
- strcpy(buf,today(format));
- calcdate(buf,1L,rueckgabe);
-
- return(rueckgabe);
-
- } /* ENDE: tomorrow() */
-